package com.woniuxy.cloud52.cinemaassembly.controller;


import com.woniuxy.cloud.ticket52.common.result.Result;
import com.woniuxy.cloud52.SessionsAPI;
import com.woniuxy.cloud52.cinemaassembly.dao.SessionsMapper;
import com.woniuxy.cloud52.cinemaassembly.model.Sessions;
import com.woniuxy.cloud52.cinemaassembly.service.ISessionsService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 场次表 前端控制器
 * </p>
 *
 * @author rc
 * @since 2021-05-06
 */
@RestController
@Slf4j
public class SessionsController implements SessionsAPI {
    @Autowired
    private ISessionsService sessionsService;

    @Autowired
    private SessionsMapper mapper;

    @Override
    public Result getSessions(int mcid) {
        log.info("查询电影{}场次",mcid);
        Sessions byMcid = mapper.findByMcid(mcid);
        return Result.success(byMcid);
    }
}

